package com.gomyb.admin.module.user.service;

import com.gomyb.admin.module.user.model.SysPermission;
import com.gomyb.admin.module.user.model.pojo.TransferPermission;
import com.gomyb.common.base.BaseService;
import com.gomyb.result.Result;

import java.util.List;

/**
 * @author <a href="mailto:hellohesir@gmail.com">Mr_He</a>
 * 2019-04-01 16:57:21
 */
public interface SysPermissionService extends BaseService<SysPermission, Long> {

    /**
     * 获得用户权限
     */
    List<SysPermission> findPermissionsByUserName(String userName);

    /**
     * 批量保存或更新
     */
    void saveOrUpdate(List<SysPermission> sysPermissionList);

    /**
     * 获得全部权限
     */
    Result<TransferPermission> findTransferAll();

}
